package com.fwixvye.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fwixvye.pojo.Relics;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 圣遗物详细表 Mapper 接口
 * </p>
 *
 * @author fwixvye
 * @since 2024-02-12
 */

@Mapper
public interface RelicsMapper extends BaseMapper<Relics> {


    /**
     * @param relics 插入圣遗物的接口
     */
    @Insert("INSERT INTO relics(name, TwoPieceEffect, FourPieceEffect, MinimumRarity, MaximumRarity) " +
            "VALUES (#{name},#{TwoPieceEffect},#{FourPieceEffect},#{MinimumRarity},#{MaximumRarity})")
    void relicsAddData(Relics relics);


    @Select("select * from relics where name = #{s}")
    Relics selectAllByName(String s);
}
